package com.jymj.enumEntity.floatpopu;

/**
 * Created by ljj on 2018/9/26. 文化程度
 */
public enum WhcdEnum {
    one("博士", 0),
    two("硕士", 10),
    nine("大学本科", 20),
    three("大专", 30),
    four("中专", 40),
    five("中技", 50),
    six("高中", 60),
    seven("初中", 70),
    se("小学", 80),
    fr("学龄前", 100),
    ven("文盲半文盲", 90),
    ve("其他", 110),;
    // 成员变量
    private String name;
    private int index;

    // 构造方法
    private WhcdEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (WhcdEnum s : WhcdEnum.values()) {
            if (s.getIndex() == index) {
                return s.name;
            }
        }
        return null;
    }

    // get set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
